package edu.pku.hawk.controller.util;

import java.io.Serializable;

/**
 * @author power
 * 
 *         This class is use to describe the initial state of the object in the
 *         sand table including
 * 
 */
public class SubjectDescription implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 802176881824700932L;

	public SubjectDescription(String id, int type, int x, int y) {
		this.id = id;
		this.type = type;
		this.x = x;
		this.y = y;
	}
	
	public SubjectDescription(String id, int type, int x, int y, int x1, int y1) {
		this.id = id;
		this.type = type;
		this.x = x;
		this.y = y;
		this.x1 = x1;
		this.y1 = y1;
	}

	/**
	 * Sensor type, description is in the AppConstant
	 * 
	 */
	public int type;

	/**
	 * initial x coordinate
	 */
	public int x;

	/**
	 * initial y coordinate
	 */
	public int y;

	/**
	 * id of the object
	 */
	public String id;

	public int x1;// If it is infrerad, then <x,y> and <x1,y1> is the location

	public int getX1() {
		return x1;
	}

	public void setX1(int x1) {
		this.x1 = x1;
	}

	public int getY1() {
		return y1;
	}

	public void setY1(int y1) {
		this.y1 = y1;
	}

	// of one sensor pair. Otherwise, <x1,y1> is always <0,0>.
	public int y1;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	@Override
	public String toString() {
		return "SubjectDescription [id=" + id + ", type=" + type + ", x=" + x
				+ ", x1=" + x1 + ", y=" + y + ", y1=" + y1 + "]";
	}

}
